import {createRouter, createWebHistory, RouteRecordRaw} from 'vue-router'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    redirect: '/Login',
    component: () => import('@/views/loginRegisterPage.vue'),
    children: [
      {
        path: '/Login',
        component: () => import('@/views/loginRegisterPage/Login.vue')
      }
    ]
  },
  {
    path: '/student',
    component: () => import('@/views/studentPage.vue'),
    redirect: '/studentProfile',
    children: [
      {
        path: '/studentProfile',
        component: () => import('@/views/studentPage/studentProfile.vue')
      },
      {
        path: '/studentGrade',
        component: () => import('@/views/studentPage/studentGrade.vue')
      },
      {
        path: '/chooseClass',
        component: () => import('@/views/studentPage/chooseClass.vue')
      },
      {
        path: '/curricularSheet',
        component: () => import('@/views/studentPage/studentCurricularSheet.vue')
      },
      {
        path: '/evaluate',
        component: () => import('@/views/studentPage/evaluate.vue')
      }
    ]
  },
  {
    path: '/teacher',
    component: () => import('@/views/teacherPage.vue')
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
